#ifndef PATHLIST_H
#define PATHLIST_H

#include <limits.h>
#include "configuration.h"

typedef struct {
	char path[PATH_MAX];
	size_t len;
} path_t;

typedef struct {
	path_t *records;
	off_t *index;

	size_t size;
	size_t used;
} pathlist_t;

void pathlist_init (pathlist_t *pathlist);
void pathlist_free (pathlist_t *pathlist);

int pathlist_load (pathlist_t *pathlist, configuration_t *conf);

int pathlist_insert (pathlist_t *pathlist, const char *path, size_t pathlen);

int pathlist_exists (pathlist_t *pathlist, const char *path, size_t pathlen);

#endif /* PATHLIST_H */
